<?php /*a:2:{s:69:"D:\phpstudy_pro\WWW\xiaomu\tp\app\admin\view\web\webconfig\index.html";i:1725700023;s:56:"D:\phpstudy_pro\WWW\xiaomu\tp\app\admin\view\layout.html";i:1725115306;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>欢迎使用小木CMS内容管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="stylesheet" href="/zhcms/layui_v2_9_10/css/layui.css" media="all">
    <link rel="stylesheet" href="/zhcms/style.css?v=<?php echo time();?>" media="all">

    <script src="/zhcms/jquery/jquery-3.6.0.min.js" charset="utf-8"></script>
    <script src="/zhcms/layui_v2_9_10/layui.js" charset="utf-8"></script>

</head>
<body>
<blockquote class="layui-elem-quote">
  网站基本信息
</blockquote>

<div class="layui-btn-container mt15 mb15">

  <form class="layui-form" action="">

    <div class="layui-form-item">
      <label class="layui-form-label">网站图标</label>
      <div class="layui-input-block">
        <input type="text" name="logo" value="<?php echo htmlentities((string) $webconfig['logo']); ?>" placeholder="网站图标" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">网站名称</label>
      <div class="layui-input-block">
        <input type="text" name="webname" value="<?php echo htmlentities((string) $webconfig['webname']); ?>" placeholder="网站名称" autocomplete="off" class="layui-input">
      </div>
    </div>
    

    <div class="layui-form-item">
      <label class="layui-form-label">网站地址</label>
      <div class="layui-input-block">
        <input type="text" name="siteurl" value="<?php echo htmlentities((string) $webconfig['siteurl']); ?>" placeholder="网站地址" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">copyright</label>
      <div class="layui-input-block">
        <input type="text" name="copyright" value="<?php echo htmlentities((string) $webconfig['copyright']); ?>" placeholder="2022-2024" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">ICP</label>
      <div class="layui-input-block">
        <input type="text" name="icp" value="<?php echo htmlentities((string) $webconfig['icp']); ?>" placeholder="备案号" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">ICP链接</label>
      <div class="layui-input-block">
        <input type="text" name="icp_url" value="<?php echo htmlentities((string) $webconfig['icp_url']); ?>" placeholder="ICP链接" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">SEO标题</label>
      <div class="layui-input-block">
        <input type="text" name="seo_title" value="<?php echo htmlentities((string) $webconfig['seo_title']); ?>" placeholder="SEO标题" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">首页关键词</label>
      <div class="layui-input-block">
        <textarea name="seo_keywords" placeholder="首页描述" class="layui-textarea"><?php echo htmlentities((string) $webconfig['seo_keywords']); ?></textarea>
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">首页描述</label>
      <div class="layui-input-block">
        <textarea name="seo_description" placeholder="首页描述" class="layui-textarea"><?php echo htmlentities((string) $webconfig['seo_description']); ?></textarea>
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">公司地址</label>
      <div class="layui-input-block">
        <input type="text" name="address" value="<?php echo htmlentities((string) $webconfig['address']); ?>" placeholder="公司地址" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">公司名称</label>
      <div class="layui-input-block">
        <input type="text" name="name" value="<?php echo htmlentities((string) $webconfig['name']); ?>" placeholder="公司名称" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">联系方式</label>
      <div class="layui-input-block">
        <input type="text" name="phone" value="<?php echo htmlentities((string) $webconfig['phone']); ?>" placeholder="联系方式" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">QQ</label>
      <div class="layui-input-block">
        <input type="text" name="qq" value="<?php echo htmlentities((string) $webconfig['qq']); ?>" placeholder="qq" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">微信号</label>
      <div class="layui-input-block">
        <input type="text" name="weixin" value="<?php echo htmlentities((string) $webconfig['weixin']); ?>" placeholder="微信号" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">邮箱</label>
      <div class="layui-input-block">
        <input type="text" name="email" value="<?php echo htmlentities((string) $webconfig['email']); ?>"  placeholder="邮箱" autocomplete="off" class="layui-input">
      </div>
    </div>




    <div class="layui-form-item">
      <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit lay-filter="configbtn">立即提交</button>
        <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
      </div>
    </div>


  </form>
    
</div>

<script>
  layui.use(['form', 'laydate', 'util'], function(){
    var form = layui.form;
    var layer = layui.layer;

    
    // 提交事件
    form.on('submit(configbtn)', function(data){
      var field = data.field; // 获取表单字段值
      // 显示填写结果，仅作演示用
      // layer.alert(JSON.stringify(field), {
      //   title: '当前填写的字段值'
      // });
      // 此处可执行 Ajax 等操作
      // …

      $.post("<?php echo url('web.Webconfig/index'); ?>",field,function(res){
        console.log(res)
        if(res.code==1){
          layer.msg("更新成功")
        }else{
          layer.msg("更新失败")
        }
      })


      return false; // 阻止默认 form 跳转
    });
    






  });
  </script>
</body>
</html>